from django.urls import path
from .views import UserView
from .views import IndexView
from .views import NodeView
from .views import StreamView
from .views import ControlView
from .views import OpenView
from .views import StorageView
from .views import InnerlView


app_name = 'app'

urlpatterns = [
    # 主页功能
    path('', IndexView.index),

    # 登陆退出
    path('captcha', UserView.captcha),
    path('login', UserView.login),
    path('logout', UserView.logout),

    # 用户管理
    path('user/index', UserView.index),
    path('user/add', UserView.add),
    path('user/edit', UserView.edit),
    path('user/postDel', UserView.api_postDel),


    # 节点管理
    path('node/index', NodeView.index),
    path('node/add', NodeView.add),
    path('node/edit', NodeView.edit),
    path('node/openDel', NodeView.api_openDel),
    path('node/openSync', NodeView.api_openSync),
    path('node/openInfo', NodeView.api_openInfo),
    path('node/openImportUpdate', NodeView.api_openImportUpdate),

    # 节点视频管理
    path('stream/index', StreamView.index),
    path('stream/openIndex', StreamView.api_openIndex),
    path('stream/openAddStreamProxy', StreamView.api_openAddStreamProxy),
    path('stream/openDelStreamProxy', StreamView.api_openDelStreamProxy),
    path('stream/openHandleAllStreamProxy', StreamView.api_openHandleAllStreamProxy),
    path('stream/openDel', StreamView.api_openDel),
    path('stream/player', StreamView.player),

    # 节点布控管理
    path('control/index', ControlView.index),
    path('control/openIndex', ControlView.api_openIndex),
    path('control/add', ControlView.add),
    path('control/openAdd', ControlView.api_openAdd),
    path('control/edit', ControlView.edit),
    path('control/openEdit', ControlView.api_openEdit),
    path('control/openLog', ControlView.api_openLog),
    path('control/openDel', ControlView.api_openDel),
    path('control/openCopy', ControlView.api_openCopy),
    path('control/openSettings', ControlView.api_openSettings),
    path('control/openHandleAllControl', ControlView.api_openHandleAllControl),
    path('control/openStartControl', ControlView.api_openStartControl),
    path('control/openStopControl', ControlView.api_openStopControl),
    # 授权接口
    # 内部接口
    path('inner/on_stream_not_found', InnerlView.api_on_stream_not_found),

    # 开放接口
    path('open/getIndex', OpenView.api_getIndex),
    path('open/getZlmProcessData', OpenView.api_getZlmProcessData),
    path('open/getAllCoreProcessData', OpenView.api_getAllCoreProcessData),
    path('open/getAllCoreProcessData2', OpenView.api_getAllCoreProcessData2),
    path('open/getAllStreamData', OpenView.api_getAllStreamData),
    path('open/getControl', OpenView.api_getControl),


    # 下载模块
    path('storage/download', StorageView.download),
    path('storage/access', StorageView.access)
]
